package com.osgix.authorize.dao.impl;

import org.springframework.stereotype.Repository;

import com.osgix.authorize.dao.RoleInfoDao;
import com.osgix.authorize.model.RoleInfo;
import com.osgix.common.orm.ibatis.BaseIbatisDao;

@Repository("roleInfoDao")
public class RoleInfoDaoImpl extends BaseIbatisDao<RoleInfo, Long> implements RoleInfoDao {

	@Override
	public String getIbatisMapperNamesapce() {
		return "RoleInfo";
	}

	public void saveOrUpdate(RoleInfo roleInfo) {
		if (roleInfo.getRoleId() == null)
			save(roleInfo);
		else
			update(roleInfo);
	}

}
